package thread.threadlocal;

public class InheritableThreadLocalTest {
    private static ThreadLocal<String> threadLocal = new InheritableThreadLocal<>();
    public static void main(String[] args) {
        threadLocal.set("steak");

        new Thread(new Runnable() {
            @Override
            public void run() {
                //System.out.println("子线程中获取："+threadLocal.get());
                threadLocal.get();
            }
        }).start();

        System.out.println("父线程中获取: "+threadLocal.get());
    }
}
